<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Windows Interface Reference: Region structure</title>
</head>

<body>

<h1>Region </h1>

<p>The Region structure contains functions to operate on regions.</p>

<pre>structure Region:
sig
    type HDC and HBRUSH and HRGN and HPEN
	type POINT = { x: int, y: int }
	type RECT = { top: int, left: int, bottom: int, right: int }

    type RegionOperation
    val RGN_AND : RegionOperation
    val RGN_COPY : RegionOperation
    val RGN_DIFF : RegionOperation
    val RGN_ERROR : RegionOperation
    val RGN_OR : RegionOperation
    val RGN_XOR : RegionOperation

    type ResultRegion
    val COMPLEXREGION : ResultRegion
    val NULLREGION : ResultRegion
    val ERROR : ResultRegion
    val SIMPLEREGION : ResultRegion

    type PolyFillMode
    val ALTERNATE : PolyFillMode
    val WINDING : PolyFillMode

    val CombineRgn : HRGN * HRGN * HRGN * RegionOperation -&gt; ResultRegion
    val CreateEllipticRgn : RECT -&gt; HRGN
    val CreatePolygonRgn : POINT list * PolyFillMode -&gt; HPEN
    val CreateRectRgn : RECT -&gt; HRGN
    val CreateRoundRectRgn : RECT * int * int -&gt; HRGN
    val EqualRgn : HRGN * HRGN -&gt; bool
    val FillRgn : HDC * HRGN * HBRUSH -&gt; unit
    val FrameRgn : HDC * HRGN * HBRUSH * int * int -&gt; unit
    val GetPolyFillMode : HDC -&gt; PolyFillMode
    val GetRgnBox : HRGN -&gt; RECT
    val InvertRgn : HDC * HRGN -&gt; unit
    val OffsetRgn : HRGN * int * int -&gt; ResultRegion
    val PaintRgn : HDC * HRGN -&gt; unit
    val PtInRegion : HRGN * int * int -&gt; bool
    val RectInRegion : HRGN * RECT -&gt; bool
    val SetPolyFillMode : HDC * PolyFillMode -&gt; PolyFillMode
    val SetRectRgn : HRGN * RECT -&gt; bool
  end</pre>
</body>
</html>
